﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Ccit.SysLogin.index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>欢迎登陆神州数码销售管理系统</title>
    <style type="text/css">
    
    body {background-color: #C2B8AB;}
    
    </style>
    <link href="css/enter.css" rel="stylesheet" type="text/css">
    <script language="javascript" src="script/jquery.js" type="text/javascript"></script>
    <script language="javascript" src="script/StringClass_Ext.js"></script>
    <script type="text/javascript">
    <!--
        function doLogin() {
            var vLgName = jQuery.trim($get("txtLgName").value);
            var vPwd = jQuery.trim($get("txtPwd").value);
            
            if(vLgName == "") {
                alert("请输入登陆名!");
                $get("txtLgName").focus();
                return false;
             }
             
             if(vPwd == "") {
                alert("口令不能为空!");
                $get("txtPwd").focus();
                return false;
             }
            var sb = new StringBuilder;
            sb.append("<LOGININFO><LOGINNAME><![CDATA[").append(vLgName).append("]]></LOGINNAME>");
            sb.append("<PASSWORD><![CDATA[").append(vPwd).append("]]></PASSWORD>");
            sb.append("<EPASS></EPASS></LOGININFO>");
            PageMethods.CheckLoginUser(sb.toString(),ClientCallBack);
            
            return false;
        }
        
        function ClientCallBack(vResultXML) {
            var oXMLDoc = new ActiveXObject("Microsoft.XMLDOM");  
            oXMLDoc.loadXML(vResultXML);
            
            var vLoginCode = $(oXMLDoc).find("LOGINCODE").text();  //校验结果
            var vErrorMsg = $(oXMLDoc).find("ERRORDESC").text();  //错误提示   
            if(vLoginCode == "1") {
                //alert("登陆成功!");
                //在这个位置实现页面跳转
                var strURL = "./homepage.aspx";
                document.location.href = strURL;
            }
            else
                alert(vErrorMsg);
        }
        
        function MM_preloadImages() { //v3.0
            var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
            var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
            if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        }

        function MM_swapImgRestore() { //v3.0
          var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
        }

        function MM_findObj(n, d) { //v4.01
          var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
          if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
          for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
          if(!x && d.getElementById) x=d.getElementById(n); return x;
        }

        function MM_swapImage() { //v3.0
          var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
           if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
        }
    //-->
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server">
       </asp:ScriptManager>
       <table width="65%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
            <td height="130">&nbsp;</td>
            </tr>
        </table>
        <table width="62%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td width="11" height="5"><img src="images/enter2_03.jpg" width="11" height="5"></td>
                <td height="5" background="images/enter2_04.jpg"><img src="images/enter2_04.jpg" width="1" height="5"></td>
                <td width="15" height="5"><img src="images/enter2_06.jpg" width="15" height="5"></td>
            </tr>
            <tr>
                <td background="images/enter2_08.jpg"><img src="images/enter2_08.jpg" width="11" height="1"></td>
                <td height="300" bgcolor="#FFFFFF">
                    <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="2"><img src="images/str.gif" width="1" height="10"></td>
                        </tr>
                        <tr>
                            <td colspan="2"><img src="images/enter2_16.jpg" width="182" height="38"></td>
                        </tr>
                        <tr>
                             <td width="19%">&nbsp;</td>
                            <td><img src="images/enter2_14.jpg" width="372" height="47"></td>
                        </tr>
                        <tr>
                            <td height="160" colspan="2">
                               <table width="200"  border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td>
                                        <div align="center"><img src="images/enter2_25.jpg" width="41" height="12"></div>
                                    </td>
                                    <td height="17">
                                        <div align="center">
                                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="1" rowspan="3" background="images/enter2_19.jpg"><img src="images/enter2_19.jpg" width="1" height="17"></td>
                                              <td bgcolor="#DBD6CD"><img src="images/str.gif" width="1" height="1"></td>
                                              <td width="1" rowspan="3" background="images/enter2_19.jpg"><img src="images/enter2_19.jpg" width="1" height="17"></td>
                                            </tr>
                                            <tr>
                                              <td width="100" height="15">
                                                <input name="txtLgName" id="txtLgName" type="text" class=smallInput value="" size="20"></td>
                                            </tr>
                                            <tr>
                                              <td bgcolor="#DBD6CD"><img src="images/str.gif" width="1" height="1"></td>
                                            </tr>
                                       </table>
                                        </div>
                                    </td>
                                 </tr>
                                 <tr>
                                    <td height="15" colspan="2"><img src="images/str.gif" width="1" height="15"></td>
                                </tr>
                                <tr>
                                    <td><div align="center"><img src="images/enter2_34.jpg" width="41" height="12"></div></td>
                                    <td height="17"><div align="center">
                                        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                              <td width="1" rowspan="3" background="images/enter2_19.jpg"><img src="images/enter2_19.jpg" width="1" height="17"></td>
                                              <td bgcolor="#DBD6CD"><img src="images/str.gif" width="1" height="1"></td>
                                              <td width="1" rowspan="3" background="images/enter2_19.jpg"><img src="images/enter2_19.jpg" width="1" height="17"></td>
                                            </tr>
                                            <tr>
                                              <td width="100" height="15">
                                                <input name="txtPwd" id="txtPwd" type="password" class=smallInput value="" size="20"></td>
                                            </tr>
                                            <tr>
                                              <td bgcolor="#DBD6CD"><img src="images/str.gif" width="1" height="1"></td>
                                            </tr>
                                      </table>
                                     </div>
                                   </td>
                                </tr>
                                <tr>
                                    <td colspan="2"><img src="images/str.gif" width="1" height="12"></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td><asp:ImageButton ID="imgBtn" ImageUrl="images/enter2_39.jpg" Width="83" Height="30" 
                                        onMouseOver="MM_swapImage('Image1','','images/enter2_B_39.jpg',1)" onMouseOut="MM_swapImgRestore()" runat="server" /></td>
                                </tr>
                            </table>
                         </td>
                      </tr>
                      <tr>
                        <td>&nbsp;</td>
                        <td><img src="images/enter2_43.jpg" width="372" height="29"></td>
                        </tr>
                      <tr>
                        <td><img src="images/str.gif" width="1" height="20"></td>
                        <td>&nbsp;</td>
                      </tr>
                    </table>
                 </td>
                 <td background="images/enter2_10.jpg"><img src="images/enter2_10.jpg" width="15" height="1"></td>
              </tr>
              <tr background="images/enter2_47.jpg">
                <td width="11" height="5" background="images/enter2_47.jpg"><img src="images/enter2_46.jpg" width="11" height="6"></td>
                <td height="5" background="images/enter2_47.jpg"><img src="images/enter2_47.jpg" width="1" height="6"></td>
                <td height="5" background="images/enter2_47.jpg"><img src="images/enter2_48.jpg" width="15" height="6"></td>
              </tr>
            </table>    
        
    <script type="text/javascript">
    <!--
        $(document).ready(function(){     
            MM_preloadImages('images/enter2_B_39.jpg');
            $get("txtLgName").focus();
        });
        
    //-->
    </script>
       
    </form>
    
    </body>
</html>
